﻿using ZY.EntityFrameWork.Core.Context;
using ZY.EntityFrameWork.Core.DBHelper;

namespace ZY.EntityFrameWork.Core.Services
{
    public abstract class BaseRootService
    {
        private readonly IUnitOfWorkContext context;
        public IUnitOfWorkContext Context
        {
            get { return this.context; }
        }

        public BaseRootService()
        {
            context = UnityHelper.Instance.Resolve<IUnitOfWorkContext>();
        }

        public BaseRootService(IUnitOfWorkContext unitContext)
        {
            context = unitContext;
        }
    }
}
